package com.kai.Util;

import com.kai.service.UsdtServie;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * 定时任务
 */
@Component
public class ScheduledTask {
    private static Logger log = LoggerFactory.getLogger(ScheduledTask.class);

    @Autowired
    private UsdtServie usdtServie;

    @Scheduled(fixedDelay = 300000)
    public void blockScanBitcoin(){
        log.info("***********************充值节点开始扫块：{}");
        usdtServie.blockScanUsdt();
        log.info("***********************充值节点结束扫块：{}");
        log.info("***********************提现节点开始扫块：{}");
        usdtServie.blockScanUsdtWithdraw();
        log.info("***********************提现节点结束扫块：{}");
    }

}
